<?php



/**
 * 基类Model
 * Enter description here ...
 * @author Admin
 *
 */
class CommonModel extends AdvModel {
	
	
	/**
	 * 获取数据
	 * Enter description here ...
	 * @param unknown_type $map
	 * @param unknown_type $limit
	 */
	public function getdata($map,$limit){
		$data = $this->where($map)->order('id desc')->limit($limit)->findAll();
		return $data;
	}
	
	
	/**
	 * 获取记录
	 * Enter description here ...
	 * @param unknown_type $map
	 * @param unknown_type $limit
	 */
	public function getCount($map,$limit){
		$data = $this->where($map)->order('id desc')->limit($limit)->count();
		return $data;
	}
	
	
}
?>